package ee.greaton.siteManager.utils;

import java.lang.reflect.Array;
import java.util.ArrayList;

public class Utils {

	public static <T> Object[] toArray(ArrayList<T> list, Class c){
		T[] array = (T[]) Array.newInstance(c, list.size());
		for(int i = 0; i< list.size(); i++){
			array[i] = list.get(i);
		}
		return array;
	}
}
